package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

/**
 * 订单明细相关接口
 */
@Mapper
public interface OrderDetailMapper {
    void insertBatch(ArrayList<OrderDetail> orderDetails);

    /**
     * 根据userID查询订单细节
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId} ")
    List<OrderDetail> getById(Long orderId);
}
